package org.cloud.im.admin.listener;

import com.alibaba.fastjson.JSONObject;
import org.cloud.im.core.ImChannelContext;
import org.cloud.im.core.exception.ImException;
import org.cloud.im.core.packets.User;
import org.cloud.im.server.listener.AbstractImUserListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @Author: w.weidong.lin@abite.com
 * @Description:
 * @Date: create in 2021/10/22 9:17
 */
public class ImAdminUserListener extends AbstractImUserListener {

    private static Logger logger = LoggerFactory.getLogger(ImAdminUserListener.class);

    @Override
    public void doAfterBind(ImChannelContext imChannelContext, User user) throws ImException {
        logger.info("绑定用户:{}", JSONObject.toJSONString(user));
    }

    @Override
    public void doAfterUnbind(ImChannelContext imChannelContext, User user) throws ImException {
        logger.info("解绑用户:{}", JSONObject.toJSONString(user));
    }
}
